<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AlterParticipantsTable extends Migration
{
    const TABLE = 'participants';
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if (Schema::hasTable(self::TABLE)) {
            Schema::table(self::TABLE, function (Blueprint $table) {
                $table->addColumn('string', 'username', ['length' => 100,'default'=>'','comment'=>'用户名']);
                $table->addColumn('string', 'nickname', ['length' => 100,'default'=>'','comment'=>'昵称']);
                $table->addColumn('string', 'uid', ['length' => 36,'default'=>'','comment'=>'用户id']);
                $table->addColumn('string', 'avatar', ['length' => 200,'default'=>'','comment'=>'头像']);
                $table->addColumn('string','mobile',['length' => 11,'default'=>'','comment'=>'手机']);

            });
        }
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {

    }
}
